const {
	Controller
} = require('uni-cloud-router')
module.exports = class GoodsController extends Controller {
	/**
	 * 收藏/取消
	 */
	async favorite() {
		let {
			goods_id,
			isFav
		} = this.ctx.data;
		const {
			uid,
		} = this.ctx.auth;
		return await this.service.mall.goods.setFavorite(uid, goods_id, isFav)
	}
}
